<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">

    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>WiFi-认证</title>

    <!-- Bootstrap -->
    <link href="{:ADDON_PUBLIC_PATH}//dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
	<link href="{:ADDON_PUBLIC_PATH}//dist/css/theme.css" rel="stylesheet">
	<script src="{:ADDON_PUBLIC_PATH}//dist/js/jquery-1.11.1.min.js"></script>
	<script src="{:ADDON_PUBLIC_PATH}//dist/js/bootstrap.min.js"></script>
	<script src="{:ADDON_PUBLIC_PATH}//dist/js/site.js"></script>
	<script src="http://portal.ikuai8.com/sdk/ikAuth.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
<body role="document">

<div id="main" class="jumbotron masthead" style="padding-bottom:0;">
	<div class="container">
		<div class="container" align="center">
			<a id="logo" href="" style="color:#FFF;font-size:32px;">
				<img  src="{:ADDON_PUBLIC_PATH}/logo-combine2.png" style="height:200px;" alt="Responsive image">
			</a>
		</div>
		<div id="title" style="font-size:16px;margin-top:20px;margin-bottom:20px;text-align:center">
			<span style="color:rgb(255,233,0);">微信扫描「WiFi认证二维码」，获取验证码。</span>
		</div>
	
		<div class="row" >
			<div class="col-sm-4" ></div>
			<div id="rz" class="col-sm-4">
          		<div class="form-group hidden-xs" style="text-align:center;padding:20px 0;">
          			<div class="shake shake-slow" >
                		<img style="width:150px;left:0px;" class="shadow" src="{:ADDON_PUBLIC_PATH}/wifi-verify.jpeg" /> 
          			</div>
				</div>
			
			
				<form >
					<div class="input-group">
				      <input type="text"  class="form-control" id='code' name='code' placeholder="" >
				      <span class="input-group-btn">
				        <button class="btn btn-warning " type="button" id='verify-btn'>开始验证</button>
				      </span>
				    </div><!-- /input-group -->
				</form>
				
				<button id="ikLogin" type="button" class="btn btn-primary btn-lg btn-block hidden">一键认证</button>
				<!--
				<button id="ikGdpass" type="button" class="btn btn-lg btn-success btn-block">固定密码认证</button>
				<br>
				<button id="ikQQLogin" type="button" class="btn btn-lg btn-primary btn-block">QQ认证</button>
				<br>
				<button id="ikGotoCouponPage" type="button" class="btn btn-lg btn-warning btn-block">优惠券认证</button>
				<br>
				<button id="ikWechatLogin" type="button" class="btn btn-lg btn-success btn-block">微信认证</button>
				<br>
				<button id="ikGotoAccount" type="button" class="btn btn-info btn-block hidden-xs">用户密码认证</button>	
				-->		
			</div>
			<div class="col-xs-4"></div>
		</div>
		<!--
		<div class="row">
			<div class="col-xs-12">
				<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">					
					  <div class="carousel-inner" role="listbox">
					    <div class="item active" align="center">
					      <a href="/Activity/index"><img src="/Uploads/Picture/2015-01-12/54b389a48ec72.png" alt="..."></a>
					      <div class="carousel-caption">
					        特价房39元，天天秒杀
					      </div>
					    </div>
					    <div class="item">
					      <img src="..." alt="...">
					      <div class="carousel-caption">
					        ...
					      </div>
					    </div>
					  </div>
					  
					  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
					    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
					    <span class="sr-only">Previous</span>
					  </a>
					  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
					    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
					    <span class="sr-only">Next</span>
					  </a>
					</div>
			</div>
			-->
		</div>

	</div>
</div>
</body>

<script>
$(function(){
    $('#verify-btn').click(function(){
         $.ajax({
             type: "GET",
             url: '{:addons_url("WifiVerify://WifiVerify/verify")}',
             data: {code:$("#code").val()},
             dataType: "json",
             success: function(data){
			 			if(data.status){
							$('#ikLogin').click();			 			
			 			}else{
				 			alert(data.info);
			 			}
			 		}
         });
    });
});
</script>

</html>